CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

SET(src 
    testJpegCompressor.cpp)
	
IF(NOT CMAKE_BUILD_TYPE)
	SET(CMAKE_BUILD_TYPE "Debug")
ENDIF()


#IF ( MSVC )
#STRING(REPLACE "/MD"  "/MT"  CMAKE_C_FLAGS_RELWITHDEBINFO   ${CMAKE_C_FLAGS_RELWITHDEBINFO})
#STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG            ${CMAKE_C_FLAGS_DEBUG})
#STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG_INIT       ${CMAKE_C_FLAGS_DEBUG_INIT})
#STRING(REPLACE "/MD"  "/MT"  CMAKE_CXX_FLAGS_RELEASE        ${CMAKE_CXX_FLAGS_RELEASE})
#STRING(REPLACE "/MD"  "/MT"  CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
#STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG          ${CMAKE_CXX_FLAGS_DEBUG})
#STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT     ${CMAKE_CXX_FLAGS_DEBUG_INIT})
#ENDIF()

	
IF(MSVC)
	ADD_DEFINITIONS(-D"_UNICODE" -D "UNICODE" -D"STRICT" -D "JPEGCOMPRESSOR_LIB")
ENDIF()
	
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/jpegCompressor)
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/bin)


ADD_EXECUTABLE(testJpegCompressor ${src})
TARGET_LINK_LIBRARIES(testJpegCompressor "libjpegcompressor")
